<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../../common/jspcommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>注册 - 果果街 </title>
<meta name="keywords" content="果果,果果网,果果街,淘宝网导购,淘宝母婴,母婴用品,母婴产品,母婴网购,怀孕,孕期,婴幼儿,儿童,0-1岁,1-3岁,3-6岁,妈妈购物分享,逛淘宝,童装,童鞋,玩具,早教,启蒙,亲子,亲子装,纸尿裤,奶粉,母婴类美丽说,母婴类蘑菇街,母婴类爱乐活" />
<meta name="description" content="看看妈妈们为宝宝淘到的好东西，参加品牌母婴电商限时高额返利活动，推荐别人购买自己拿佣金，果果街是妈妈分享育儿消费经验，网购省钱的好地方。" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@include file="../../common/js.jsp" %>
<%@include file="../../common/css.jsp" %>
<!--[if ie]><link type="text/css" rel="stylesheet" href="/css/v4/common/IE.css"><![endif]-->

<style type="text/css">
	.register_error{color: #f69; padding:0 0 0 10px;}
</style>
</head>
<body>
	<%@include file="../../common/header.jsp" %>
    <!-- body -->
    
<c:if test="${requestType=='registerOutAccount' }">
    <form action="/member/register.htm" method="post" id="register_form">
	    <div class="w100p pt35 pb35">
	    	<div class="w980 mg ">
	            <div class="box_s6">
	                <div class="l_r_box">
	                	<h1>注册果果街</h1>	
	                    <div class="main_box">
	                    	<h3 class="title">填写您的简单信息，完成注册</h3>
	                    	<ul class="l_r_layout">
	                        	<li>
	                            	<label class="def_lbl">昵&nbsp;称：</label><input type="text" class="def_text_1 focus" name="nickname" value="${accessUser.name}"/><span></span>
	                            </li>
	                            <li>
	                            	<label class="def_lbl">邮&nbsp;箱：</label><input type="text" class="def_text_1 focus" name="email"/><span></span>
	                            </li>
	                            <li class="special">
	                            	<input type="checkbox" class="def_chk" id="checkboxRead" name="checkboxRead"/><span>已阅读并同意果果街<a href="/member/protocol.htm" class="clrred udl italic"><<使用协议>></a></span>
	                                <input type="submit" class="btn_s1" value="完&nbsp;成" />
	                            </li>
	                        </ul>
	                        <input type="hidden" name="outAccountId" value="${accessUser.uid }" /> 
							<input type="hidden" name="outAccountType" value="${accessUser.desc }" /> 
							<input type="hidden" name="outAccountName" value="${accessUser.name}" /> 
							<input type="hidden" name="accessToken" value="${accessUser.accessToken}" /> 
							<input type="hidden" name="accessSecret" value="${accessUser.accessSecret}" />
							<input type="hidden" name="avatar" value="${accessUser.headUrl}" />
							<input type="hidden" name="historyUrl" value="${historyUrl}" />
	                  	</div>
	                </div>
	                <p class="lr_copy">©2011-2012 果果街 增值电信业务经营许可证：沪B2-20110080 沪ICP备11003519号</p>
	                <div class="shadow"></div>
	            </div>
	       	</div>		
	    </div>
    </form>
</c:if>
<c:if test="${requestType=='toRegisterOutAccount' }">  
  <div class="w100p pt35 pb35">
    	<div class="w980 mg ">
            <div class="box_s6">
                <div class="l_r_box">
                	<h1>注册果果街</h1>	
                    <div class="main_box">
                    	<h3 class="title">使用以下网站账号，5秒注册果果街</h3>
                    	<div class="lr_sorts_box">
                        	<a href="/member/sinalogin.htm" class=" reg_btn"><img src="../../images/v4/common/lr_icon_1.jpg" /><span>新浪微博</span></a>
                            <a href="/member/tencentlogin.htm" class=" reg_btn"><img src="../../images/v4/common/lr_icon_3.jpg" /><span>腾讯微博</span></a>
                            <div class="blank20"></div>
                            <a href="/member/qqlogin.htm" class=" reg_btn"><img src="../../images/v4/common/lr_icon_2.jpg" /><span>腾讯&nbsp;qq</span></a>
                            <a href="/member/toplogin.htm" class=" reg_btn"><img src="../../images/v4/common/lr_icon_4.jpg" /><span>淘宝网</span></a>
                            <div class="blank20"></div>
                            <a href="/member/toregister.htm" class="lr_btn_s1">>>创建果果街邮箱账号</a>
                        </div>
                  	</div>
                </div>
                <p class="lr_copy">©2011-2012 果果街 增值电信业务经营许可证：沪B2-20110080 沪ICP备11003519号</p>
                <div class="shadow"></div>
            </div>
       	</div>		
    </div>
</c:if>    
    <!-- body--end-->
    <script type="text/javascript">
	$(document).ready(function() {
		$.validator.addMethod("stringCheck", function(value, element) {       
			   return this.optional(element) || /^[\u0391-\uFFE5\w]+$/.test(value);       
		}, "只能包括中文字、英文字母、数字和下划线");  
		$("#register_form").validate(
				{
					errorClass:"register_error",
					success : function(label) {
						label.text("").addClass("register_success");
					},
					errorPlacement: function(error,element) {
						 error.appendTo(element.next("span"));
					},
					rules : {
						nickname : {
							required : true,
							maxlength : 10,
							minlength : 2,
							remote : '/member/checknickname.htm',
							stringCheck:true
						},
						email : {
							required : true,
							email : true,
							remote : '/member/checkemail.htm',
							maxlength : 50
						},
						checkboxRead:{
							required : true
							
						}
					},
					messages : {
						nickname : {
							required : "请填写你的用户名",
							minlength : "用户名必须为2～10个字符",
							maxlength : "用户名必须为2～10个字符",
							remote : "该用户名已被注册",
							stringCheck: "用户名只能包括中文字、英文字母、数字和下划线"
						},
						email : {
							required : "请填写邮箱",
							email : "请填写正确的邮箱地址",
							remote : "该邮箱已被注册",
							maxlength : "请输入正确的邮箱地址"
						},
						checkboxRead:{
							required : "请接受服务条款"
						}
					},
					submitHandler:function(form) {
						$(form).ajaxSubmit(function(data){
							if(data!="nologin"){
								window.location.href=data;;
							}
						});
					}
				});
	});
</script>
</body>
    